package com.g1.gzbooksingle.controller;


import com.g1.gzbooksingle.model.DgAuthorInfo;
import com.g1.gzbooksingle.service.IDgAuthorInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 作者表 前端控制器
 * </p>
 *
 * @author admin
 * @since 2021-10-12
 */
@Slf4j
@Api(tags = "作者接口")
@RestController
@RequestMapping("/gzbooksingle/dgAuthorInfo")
public class DgAuthorInfoController {

    @Autowired
    private IDgAuthorInfoService iDgAuthorInfoService;

    /**
     * 通过作者id查询账户信息
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    @ApiOperation("通过作者id查询作者信息")
    public DgAuthorInfo getById(@ApiParam(value = "作者id") @PathVariable Integer id){
        DgAuthorInfo model = iDgAuthorInfoService.getById(id);
        return model;
    }


































}
